//
//  NeedHallViewController.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/4.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "NeedHallViewController.h"
#import "GoodsOrStoreNavView.h"
#import "NeedHallViewModel.h"
#import "NeedPurchaseViewController.h"
#import "PurchaseListInformationViewController.h"
#import "PurchasetPictureInformationViewController.h"

@interface NeedHallViewController ()<NeedHallDelegate>
@property (nonatomic,strong)NeedHallViewModel * needHallViewModel;
@end

@implementation NeedHallViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithHexString:@"#F2F2F2"];
    self.navigationItem.titleView = [self createNavView];
    self.needHallViewModel = [[NeedHallViewModel alloc] initWithViewToViewModel:self.tableView theSuperView:self.view];
    self.needHallViewModel.delegate =self;
}

-(UIView *)createNavView{
     GoodsOrStoreNavView * needSearchNavView = [[GoodsOrStoreNavView alloc] initWithFrame:CGRectMake(0, 0, kWidthProportion_In_iPhoneTriploid(295), kHeightProportion_In_iPhoneTriploid(30))];
    return needSearchNavView;
}

#pragma mark -- NeedHallDelegate
-(void)pushOneNeedHallOrder{
    NeedPurchaseViewController * needHallVc = [NeedPurchaseViewController new];
    [self.navigationController pushViewController:needHallVc animated:YES];
}

-(void)needPushDidSelectRowAtIndexPath:(NSIndexPath *)needindexpath{
    PurchaseListInformationViewController * purInformationVC = [PurchaseListInformationViewController new];
    [self.navigationController pushViewController:purInformationVC animated:YES];
//    PurchasetPictureInformationViewController * purchasetVc = [PurchasetPictureInformationViewController new];
//    [self.navigationController pushViewController:purchasetVc animated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
